diff options
| author | Adam Soltys <[email protected]> | 2023-11-09 16:03:29 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-11 00:04:22 -0800 |
| commit | d5a44c19ceeda9927a0ad6eb02bef4ed08128f0a (patch) | |
| tree | a05a4a698c8ae4474b5ca1b75d6dd3703b21fbeb /src/routes/(app)/fund/[name]/+page.server.js | |
| parent | 39d466f57098d9a6c3935739eabeacf1de370a25 (diff) | |
| download | coinos-ui-d5a44c19ceeda9927a0ad6eb02bef4ed08128f0a.tar.gz coinos-ui-d5a44c19ceeda9927a0ad6eb02bef4ed08128f0a.zip | |
rename fund name to id
Diffstat (limited to 'src/routes/(app)/fund/[name]/+page.server.js')
| -rw-r--r-- | src/routes/(app)/fund/[name]/+page.server.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/routes/(app)/fund/[name]/+page.server.js b/src/routes/(app)/fund/[name]/+page.server.js deleted file mode 100644 index ad20c7d9..00000000 --- a/src/routes/(app)/fund/[name]/+page.server.js +++ /dev/null @@ -1,23 +0,0 @@ -import { error, redirect } from '@sveltejs/kit'; -import { auth, get, post } from '$lib/utils'; -import Qr from 'qrcode-base64'; - -export let load = async ({ params: { name }, url }) => { - let { amount, payments } = await get(`/fund/${name}`); - - let src = Qr.drawImg(url.href, { size: 300 }); - return { amount, payments, src }; -}; - -export const actions = { - default: async ({ cookies, locals, params, request }) => { - let { user } = locals; - - if (user) { - await post('/redeem', params, auth(cookies)); - throw redirect(307, `/${user.username}/payments`); - } - - throw redirect(307, '/register'); - } -}; |
